Page({
  goDetail(ev) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + ev.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
  onShow() {
    this.getList()
  },
  data: {
    list: []
  },
  // 获取报修列表
  async getList() {
    const res = await wx.http.get('/repair', {
      current: 1,
      pageSize: 10
    })
    this.setData({
      list: res.data.rows
    })
  }
})